Integrand size = 31, antiderivative size = 253 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^3} \, dx=-\frac {4}{27 x}-\frac {25 x \left (5+x^2\right )}{144 \left (3+2 x^2+x^4\right )^2}-\frac {x \left (325+242 x^2\right )}{1728 \left (3+2 x^2+x^4\right )}+\frac {\sqrt {\frac {1}{3} \left (59711+55161 \sqrt {3}\right )} \arctan \left (\frac {\sqrt {2 \left (-1+\sqrt {3}\right )}-2 x}{\sqrt {2 \left (1+\sqrt {3}\right )}}\right )}{2304}-\frac {\sqrt {\frac {1}{3} \left (59711+55161 \sqrt {3}\right )} \arctan \left (\frac {\sqrt {2 \left (-1+\sqrt {3}\right )}+2 x}{\sqrt {2 \left (1+\sqrt {3}\right )}}\right )}{2304}-\frac {\sqrt {\frac {1}{3} \left (-59711+55161 \sqrt {3}\right )} \log \left (\sqrt {3}-\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2\right )}{4608}+\frac {\sqrt {\frac {1}{3} \left (-59711+55161 \sqrt {3}\right )} \log \left (\sqrt {3}+\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2\right )}{4608} \]
[Out]
Time = 0.22 (sec) , antiderivative size = 253, normalized size of antiderivative = 1.00, number of steps used = 13, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.226, Rules used = {1683, 1678, 1183, 648, 632, 210, 642} \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^3} \, dx=\frac {\sqrt {\frac {1}{3} \left (59711+55161 \sqrt {3}\right )} \arctan \left (\frac {\sqrt {2 \left (\sqrt {3}-1\right )}-2 x}{\sqrt {2 \left (1+\sqrt {3}\right )}}\right )}{2304}-\frac {\sqrt {\frac {1}{3} \left (59711+55161 \sqrt {3}\right )} \arctan \left (\frac {2 x+\sqrt {2 \left (\sqrt {3}-1\right )}}{\sqrt {2 \left (1+\sqrt {3}\right )}}\right )}{2304}-\frac {\sqrt {\frac {1}{3} \left (55161 \sqrt {3}-59711\right )} \log \left (x^2-\sqrt {2 \left (\sqrt {3}-1\right )} x+\sqrt {3}\right )}{4608}+\frac {\sqrt {\frac {1}{3} \left (55161 \sqrt {3}-59711\right )} \log \left (x^2+\sqrt {2 \left (\sqrt {3}-1\right )} x+\sqrt {3}\right )}{4608}-\frac {25 x \left (x^2+5\right )}{144 \left (x^4+2 x^2+3\right )^2}-\frac {x \left (242 x^2+325\right )}{1728 \left (x^4+2 x^2+3\right )}-\frac {4}{27 x} \]
[In]
[Out]
Rule 210
Rule 632
Rule 642
Rule 648
Rule 1183
Rule 1678
Rule 1683
Rubi steps \begin{align*} \text {integral}& = -\frac {25 x \left (5+x^2\right )}{144 \left (3+2 x^2+x^4\right )^2}+\frac {1}{96} \int \frac {128+30 x^2-\frac {250 x^4}{3}}{x^2 \left (3+2 x^2+x^4\right )^2} \, dx \\ & = -\frac {25 x \left (5+x^2\right )}{144 \left (3+2 x^2+x^4\right )^2}-\frac {x \left (325+242 x^2\right )}{1728 \left (3+2 x^2+x^4\right )}+\frac {\int \frac {2048-\frac {56 x^2}{3}-\frac {1936 x^4}{3}}{x^2 \left (3+2 x^2+x^4\right )} \, dx}{4608} \\ & = -\frac {25 x \left (5+x^2\right )}{144 \left (3+2 x^2+x^4\right )^2}-\frac {x \left (325+242 x^2\right )}{1728 \left (3+2 x^2+x^4\right )}+\frac {\int \left (\frac {2048}{3 x^2}-\frac {8 \left (173+166 x^2\right )}{3+2 x^2+x^4}\right ) \, dx}{4608} \\ & = -\frac {4}{27 x}-\frac {25 x \left (5+x^2\right )}{144 \left (3+2 x^2+x^4\right )^2}-\frac {x \left (325+242 x^2\right )}{1728 \left (3+2 x^2+x^4\right )}-\frac {1}{576} \int \frac {173+166 x^2}{3+2 x^2+x^4} \, dx \\ & = -\frac {4}{27 x}-\frac {25 x \left (5+x^2\right )}{144 \left (3+2 x^2+x^4\right )^2}-\frac {x \left (325+242 x^2\right )}{1728 \left (3+2 x^2+x^4\right )}-\frac {\int \frac {173 \sqrt {2 \left (-1+\sqrt {3}\right )}-\left (173-166 \sqrt {3}\right ) x}{\sqrt {3}-\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2} \, dx}{1152 \sqrt {6 \left (-1+\sqrt {3}\right )}}-\frac {\int \frac {173 \sqrt {2 \left (-1+\sqrt {3}\right )}+\left (173-166 \sqrt {3}\right ) x}{\sqrt {3}+\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2} \, dx}{1152 \sqrt {6 \left (-1+\sqrt {3}\right )}} \\ & = -\frac {4}{27 x}-\frac {25 x \left (5+x^2\right )}{144 \left (3+2 x^2+x^4\right )^2}-\frac {x \left (325+242 x^2\right )}{1728 \left (3+2 x^2+x^4\right )}-\frac {\sqrt {\frac {1}{3} \left (-59711+55161 \sqrt {3}\right )} \int \frac {-\sqrt {2 \left (-1+\sqrt {3}\right )}+2 x}{\sqrt {3}-\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2} \, dx}{4608}+\frac {\sqrt {\frac {1}{3} \left (-59711+55161 \sqrt {3}\right )} \int \frac {\sqrt {2 \left (-1+\sqrt {3}\right )}+2 x}{\sqrt {3}+\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2} \, dx}{4608}-\frac {\sqrt {\frac {1}{3} \left (112597+57436 \sqrt {3}\right )} \int \frac {1}{\sqrt {3}-\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2} \, dx}{2304}-\frac {\sqrt {\frac {1}{3} \left (112597+57436 \sqrt {3}\right )} \int \frac {1}{\sqrt {3}+\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2} \, dx}{2304} \\ & = -\frac {4}{27 x}-\frac {25 x \left (5+x^2\right )}{144 \left (3+2 x^2+x^4\right )^2}-\frac {x \left (325+242 x^2\right )}{1728 \left (3+2 x^2+x^4\right )}-\frac {\sqrt {\frac {1}{3} \left (-59711+55161 \sqrt {3}\right )} \log \left (\sqrt {3}-\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2\right )}{4608}+\frac {\sqrt {\frac {1}{3} \left (-59711+55161 \sqrt {3}\right )} \log \left (\sqrt {3}+\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2\right )}{4608}+\frac {\sqrt {\frac {1}{3} \left (112597+57436 \sqrt {3}\right )} \text {Subst}\left (\int \frac {1}{-2 \left (1+\sqrt {3}\right )-x^2} \, dx,x,-\sqrt {2 \left (-1+\sqrt {3}\right )}+2 x\right )}{1152}+\frac {\sqrt {\frac {1}{3} \left (112597+57436 \sqrt {3}\right )} \text {Subst}\left (\int \frac {1}{-2 \left (1+\sqrt {3}\right )-x^2} \, dx,x,\sqrt {2 \left (-1+\sqrt {3}\right )}+2 x\right )}{1152} \\ & = -\frac {4}{27 x}-\frac {25 x \left (5+x^2\right )}{144 \left (3+2 x^2+x^4\right )^2}-\frac {x \left (325+242 x^2\right )}{1728 \left (3+2 x^2+x^4\right )}+\frac {\sqrt {\frac {1}{3} \left (59711+55161 \sqrt {3}\right )} \tan ^{-1}\left (\frac {\sqrt {2 \left (-1+\sqrt {3}\right )}-2 x}{\sqrt {2 \left (1+\sqrt {3}\right )}}\right )}{2304}-\frac {\sqrt {\frac {1}{3} \left (59711+55161 \sqrt {3}\right )} \tan ^{-1}\left (\frac {\sqrt {2 \left (-1+\sqrt {3}\right )}+2 x}{\sqrt {2 \left (1+\sqrt {3}\right )}}\right )}{2304}-\frac {\sqrt {\frac {1}{3} \left (-59711+55161 \sqrt {3}\right )} \log \left (\sqrt {3}-\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2\right )}{4608}+\frac {\sqrt {\frac {1}{3} \left (-59711+55161 \sqrt {3}\right )} \log \left (\sqrt {3}+\sqrt {2 \left (-1+\sqrt {3}\right )} x+x^2\right )}{4608} \\ \end{align*}
Result contains complex when optimal does not.
Time = 0.26 (sec) , antiderivative size = 140, normalized size of antiderivative = 0.55 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^3} \, dx=\frac {-\frac {12 \left (768+1849 x^2+1412 x^4+611 x^6+166 x^8\right )}{x \left (3+2 x^2+x^4\right )^2}+\frac {3 i \left (332 i+7 \sqrt {2}\right ) \arctan \left (\frac {x}{\sqrt {1-i \sqrt {2}}}\right )}{\sqrt {1-i \sqrt {2}}}-\frac {3 i \left (-332 i+7 \sqrt {2}\right ) \arctan \left (\frac {x}{\sqrt {1+i \sqrt {2}}}\right )}{\sqrt {1+i \sqrt {2}}}}{6912} \]
[In]
[Out]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 0.10 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.29
method | result | size |
risch | \(\frac {-\frac {83}{288} x^{8}-\frac {611}{576} x^{6}-\frac {353}{144} x^{4}-\frac {1849}{576} x^{2}-\frac {4}{3}}{x \left (x^{4}+2 x^{2}+3\right )^{2}}+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (12 \textit {\_Z}^{4}+238844 \textit {\_Z}^{2}+3042735921\right )}{\sum }\textit {\_R} \ln \left (-1950 \textit {\_R}^{3}-37653769 \textit {\_R} +2909135979 x \right )\right )}{2304}\) | \(73\) |
default | \(-\frac {4}{27 x}-\frac {\frac {121}{32} x^{7}+\frac {809}{64} x^{5}+\frac {419}{16} x^{3}+\frac {2475}{64} x}{27 \left (x^{4}+2 x^{2}+3\right )^{2}}-\frac {\left (325 \sqrt {-2+2 \sqrt {3}}\, \sqrt {3}-21 \sqrt {-2+2 \sqrt {3}}\right ) \ln \left (x^{2}+\sqrt {3}-x \sqrt {-2+2 \sqrt {3}}\right )}{27648}-\frac {\left (692 \sqrt {3}+\frac {\left (325 \sqrt {-2+2 \sqrt {3}}\, \sqrt {3}-21 \sqrt {-2+2 \sqrt {3}}\right ) \sqrt {-2+2 \sqrt {3}}}{2}\right ) \arctan \left (\frac {2 x -\sqrt {-2+2 \sqrt {3}}}{\sqrt {2+2 \sqrt {3}}}\right )}{6912 \sqrt {2+2 \sqrt {3}}}-\frac {\left (-325 \sqrt {-2+2 \sqrt {3}}\, \sqrt {3}+21 \sqrt {-2+2 \sqrt {3}}\right ) \ln \left (x^{2}+\sqrt {3}+x \sqrt {-2+2 \sqrt {3}}\right )}{27648}-\frac {\left (692 \sqrt {3}-\frac {\left (-325 \sqrt {-2+2 \sqrt {3}}\, \sqrt {3}+21 \sqrt {-2+2 \sqrt {3}}\right ) \sqrt {-2+2 \sqrt {3}}}{2}\right ) \arctan \left (\frac {2 x +\sqrt {-2+2 \sqrt {3}}}{\sqrt {2+2 \sqrt {3}}}\right )}{6912 \sqrt {2+2 \sqrt {3}}}\) | \(293\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.27 (sec) , antiderivative size = 290, normalized size of antiderivative = 1.15 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^3} \, dx=-\frac {3984 \, x^{8} + 14664 \, x^{6} + 33888 \, x^{4} + \sqrt {6} {\left (x^{9} + 4 \, x^{7} + 10 \, x^{5} + 12 \, x^{3} + 9 \, x\right )} \sqrt {52739 i \, \sqrt {2} - 59711} \log \left (\sqrt {6} \sqrt {52739 i \, \sqrt {2} - 59711} {\left (325 i \, \sqrt {2} + 346\right )} + 330966 \, x\right ) - \sqrt {6} {\left (x^{9} + 4 \, x^{7} + 10 \, x^{5} + 12 \, x^{3} + 9 \, x\right )} \sqrt {52739 i \, \sqrt {2} - 59711} \log \left (\sqrt {6} \sqrt {52739 i \, \sqrt {2} - 59711} {\left (-325 i \, \sqrt {2} - 346\right )} + 330966 \, x\right ) - \sqrt {6} {\left (x^{9} + 4 \, x^{7} + 10 \, x^{5} + 12 \, x^{3} + 9 \, x\right )} \sqrt {-52739 i \, \sqrt {2} - 59711} \log \left (\sqrt {6} {\left (325 i \, \sqrt {2} - 346\right )} \sqrt {-52739 i \, \sqrt {2} - 59711} + 330966 \, x\right ) + \sqrt {6} {\left (x^{9} + 4 \, x^{7} + 10 \, x^{5} + 12 \, x^{3} + 9 \, x\right )} \sqrt {-52739 i \, \sqrt {2} - 59711} \log \left (\sqrt {6} {\left (-325 i \, \sqrt {2} + 346\right )} \sqrt {-52739 i \, \sqrt {2} - 59711} + 330966 \, x\right ) + 44376 \, x^{2} + 18432}{13824 \, {\left (x^{9} + 4 \, x^{7} + 10 \, x^{5} + 12 \, x^{3} + 9 \, x\right )}} \]
[In]
[Out]
Time = 0.36 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.30 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^3} \, dx=\frac {- 166 x^{8} - 611 x^{6} - 1412 x^{4} - 1849 x^{2} - 768}{576 x^{9} + 2304 x^{7} + 5760 x^{5} + 6912 x^{3} + 5184 x} + \operatorname {RootSum} {\left (4174708211712 t^{4} + 15652880384 t^{2} + 37564641, \left ( t \mapsto t \log {\left (- \frac {98146713600 t^{3}}{11971753} - \frac {9639364864 t}{323237331} + x \right )} \right )\right )} \]
[In]
[Out]
\[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^3} \, dx=\int { \frac {5 \, x^{6} + 3 \, x^{4} + x^{2} + 4}{{\left (x^{4} + 2 \, x^{2} + 3\right )}^{3} x^{2}} \,d x } \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 582 vs. \(2 (182) = 364\).
Time = 0.74 (sec) , antiderivative size = 582, normalized size of antiderivative = 2.30 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^3} \, dx=\frac {1}{746496} \, \sqrt {2} {\left (83 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 1494 \cdot 3^{\frac {3}{4}} \sqrt {2} \sqrt {6 \, \sqrt {3} + 18} {\left (\sqrt {3} - 3\right )} - 1494 \cdot 3^{\frac {3}{4}} {\left (\sqrt {3} + 3\right )} \sqrt {-6 \, \sqrt {3} + 18} + 83 \cdot 3^{\frac {3}{4}} {\left (-6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} - 3114 \cdot 3^{\frac {1}{4}} \sqrt {2} \sqrt {6 \, \sqrt {3} + 18} + 3114 \cdot 3^{\frac {1}{4}} \sqrt {-6 \, \sqrt {3} + 18}\right )} \arctan \left (\frac {3^{\frac {3}{4}} {\left (x + 3^{\frac {1}{4}} \sqrt {-\frac {1}{6} \, \sqrt {3} + \frac {1}{2}}\right )}}{3 \, \sqrt {\frac {1}{6} \, \sqrt {3} + \frac {1}{2}}}\right ) + \frac {1}{746496} \, \sqrt {2} {\left (83 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 1494 \cdot 3^{\frac {3}{4}} \sqrt {2} \sqrt {6 \, \sqrt {3} + 18} {\left (\sqrt {3} - 3\right )} - 1494 \cdot 3^{\frac {3}{4}} {\left (\sqrt {3} + 3\right )} \sqrt {-6 \, \sqrt {3} + 18} + 83 \cdot 3^{\frac {3}{4}} {\left (-6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} - 3114 \cdot 3^{\frac {1}{4}} \sqrt {2} \sqrt {6 \, \sqrt {3} + 18} + 3114 \cdot 3^{\frac {1}{4}} \sqrt {-6 \, \sqrt {3} + 18}\right )} \arctan \left (\frac {3^{\frac {3}{4}} {\left (x - 3^{\frac {1}{4}} \sqrt {-\frac {1}{6} \, \sqrt {3} + \frac {1}{2}}\right )}}{3 \, \sqrt {\frac {1}{6} \, \sqrt {3} + \frac {1}{2}}}\right ) + \frac {1}{1492992} \, \sqrt {2} {\left (1494 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (\sqrt {3} + 3\right )} \sqrt {-6 \, \sqrt {3} + 18} - 83 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (-6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 83 \cdot 3^{\frac {3}{4}} {\left (6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 1494 \cdot 3^{\frac {3}{4}} \sqrt {6 \, \sqrt {3} + 18} {\left (\sqrt {3} - 3\right )} - 3114 \cdot 3^{\frac {1}{4}} \sqrt {2} \sqrt {-6 \, \sqrt {3} + 18} - 3114 \cdot 3^{\frac {1}{4}} \sqrt {6 \, \sqrt {3} + 18}\right )} \log \left (x^{2} + 2 \cdot 3^{\frac {1}{4}} x \sqrt {-\frac {1}{6} \, \sqrt {3} + \frac {1}{2}} + \sqrt {3}\right ) - \frac {1}{1492992} \, \sqrt {2} {\left (1494 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (\sqrt {3} + 3\right )} \sqrt {-6 \, \sqrt {3} + 18} - 83 \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (-6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 83 \cdot 3^{\frac {3}{4}} {\left (6 \, \sqrt {3} + 18\right )}^{\frac {3}{2}} + 1494 \cdot 3^{\frac {3}{4}} \sqrt {6 \, \sqrt {3} + 18} {\left (\sqrt {3} - 3\right )} - 3114 \cdot 3^{\frac {1}{4}} \sqrt {2} \sqrt {-6 \, \sqrt {3} + 18} - 3114 \cdot 3^{\frac {1}{4}} \sqrt {6 \, \sqrt {3} + 18}\right )} \log \left (x^{2} - 2 \cdot 3^{\frac {1}{4}} x \sqrt {-\frac {1}{6} \, \sqrt {3} + \frac {1}{2}} + \sqrt {3}\right ) - \frac {242 \, x^{7} + 809 \, x^{5} + 1676 \, x^{3} + 2475 \, x}{1728 \, {\left (x^{4} + 2 \, x^{2} + 3\right )}^{2}} - \frac {4}{27 \, x} \]
[In]
[Out]
Time = 8.87 (sec) , antiderivative size = 179, normalized size of antiderivative = 0.71 \[ \int \frac {4+x^2+3 x^4+5 x^6}{x^2 \left (3+2 x^2+x^4\right )^3} \, dx=-\frac {\frac {83\,x^8}{288}+\frac {611\,x^6}{576}+\frac {353\,x^4}{144}+\frac {1849\,x^2}{576}+\frac {4}{3}}{x^9+4\,x^7+10\,x^5+12\,x^3+9\,x}+\frac {\mathrm {atan}\left (\frac {x\,\sqrt {-358266-\sqrt {2}\,316434{}\mathrm {i}}\,52739{}\mathrm {i}}{859963392\,\left (-\frac {17140175}{286654464}+\frac {\sqrt {2}\,9123847{}\mathrm {i}}{286654464}\right )}+\frac {52739\,\sqrt {2}\,x\,\sqrt {-358266-\sqrt {2}\,316434{}\mathrm {i}}}{1719926784\,\left (-\frac {17140175}{286654464}+\frac {\sqrt {2}\,9123847{}\mathrm {i}}{286654464}\right )}\right )\,\sqrt {-358266-\sqrt {2}\,316434{}\mathrm {i}}\,1{}\mathrm {i}}{6912}-\frac {\mathrm {atan}\left (\frac {x\,\sqrt {-358266+\sqrt {2}\,316434{}\mathrm {i}}\,52739{}\mathrm {i}}{859963392\,\left (\frac {17140175}{286654464}+\frac {\sqrt {2}\,9123847{}\mathrm {i}}{286654464}\right )}-\frac {52739\,\sqrt {2}\,x\,\sqrt {-358266+\sqrt {2}\,316434{}\mathrm {i}}}{1719926784\,\left (\frac {17140175}{286654464}+\frac {\sqrt {2}\,9123847{}\mathrm {i}}{286654464}\right )}\right )\,\sqrt {-358266+\sqrt {2}\,316434{}\mathrm {i}}\,1{}\mathrm {i}}{6912} \]
[In]
[Out]